package com.turbo.cloud.calc;

import com.turbo.cloud.calc.lottery.LotteryPrediction;

import java.util.Arrays;

public class AuguralUtil {
    public static void main(String[] args) {
        // 假设双色球红球号码为1-33，蓝球号码为1-16
        int ssqRedNum = 33;
        int ssqBlueNum = 16;
        // 假设大乐透红球号码为1-35，蓝球号码为1-12
        int dltRedNum = 35;
        int dltBlueNum = 12;
        LotteryPrediction ssqRedPrediction = new LotteryPrediction(ssqRedNum);
        LotteryPrediction ssqBluePrediction = new LotteryPrediction(ssqBlueNum);
        LotteryPrediction dltRedPrediction = new LotteryPrediction(dltRedNum);
        LotteryPrediction dltBluePrediction = new LotteryPrediction(dltBlueNum);
        // 添加历史开奖记录
        ssqRedPrediction.addHistory(new int[]{9, 21, 23, 25, 33});
        ssqRedPrediction.addHistory(new int[]{7, 11, 15, 26, 28});
        ssqRedPrediction.addHistory(new int[]{2, 9, 18, 23, 27});
        ssqRedPrediction.addHistory(new int[]{5, 6, 23, 25, 28});
        ssqRedPrediction.addHistory(new int[]{5, 8, 9, 11, 15});
        ssqBluePrediction.addHistory(new int[]{3, 10});
        ssqBluePrediction.addHistory(new int[]{8, 10});
        ssqBluePrediction.addHistory(new int[]{3, 5});
        ssqBluePrediction.addHistory(new int[]{6, 9});
        ssqBluePrediction.addHistory(new int[]{6, 8});


        //dltRedPrediction.addHistory(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); // 假设大乐透红球历史开奖记录为1,2,3,4,5,6,7,8,9,10,11,12
        //dltBluePrediction.addHistory(new int[]{1, 2, 3, 4, 5}); // 假设大乐透蓝球历史开奖记录为1,2,3,4,5
        // 预测下一期的开奖号码
        int[] ssqRedCurr = new int[]{9, 21, 23, 25, 33};
        int[] ssqBlueCurr = new int[]{3, 10};


        int[] dltRedCurr = new int[]{12, 13, 14, 15, 16}; // 假设大乐透红球当前期开奖号码为12,13,14,15,16
        int[] dltBlueCurr = new int[]{6, 7, 8, 9, 10}; // 假设大乐透蓝球当前期开奖号码为6,7,8,9,10
        int topN = 5; // 预测前5个号码
        int[] ssqRedResult = ssqRedPrediction.predict(ssqRedCurr, topN);
        int[] ssqBlueResult = ssqBluePrediction.predict(ssqBlueCurr, topN);
        int[] dltRedResult = dltRedPrediction.predict(dltRedCurr, topN);
        int[] dltBlueResult = dltBluePrediction.predict(dltBlueCurr, topN);
        System.out.println("双色球预测的红球号码为：" + Arrays.toString(ssqRedResult));
        System.out.println("双色球预测的蓝球号码为：" + Arrays.toString(ssqBlueResult));
        System.out.println("大乐透预测的红球号码为：" + Arrays.toString(dltRedResult));
        System.out.println("大乐透预测的蓝球号码为：" + Arrays.toString(dltBlueResult));
    }
}
